// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  // devServer: {
  //   host: '0.0.0.0',
  //   port: 5000,
  // },
  // nitro: {
  //   devProxy: {
  //     '/api/': {
  //       target: 'http://120.24.224.201:1024/',
  //       changeOrigin: true
  //     }
  //   }
  // },
  runtimeConfig:{
    public:{
      baseURL:process.env.NUXT_BASE_URL
    }
  },
  app: {
    // baseURL: process.env.NUXT_BASE_URL,//
    head: {
      link: [
        { rel: 'icon', type: 'image/x-icon', href: '/logo.png' }
      ]
    },
  },
  modules: [
    "@vueuse/nuxt",
    "@unocss/nuxt",
    "@pinia/nuxt",
    "@pinia-plugin-persistedstate/nuxt",
    "@element-plus/nuxt",
  ],
  elementPlus: { importStyle: "scss" },
  css: ["@/assets/styles/index.scss", "element-plus/dist/index.css"],
  vite: {
    css: {
      preprocessorOptions: {
        scss: {
          additionalData: `@use "@/assets/styles/variables.scss" as element;`,
        },
      },
    },
  },
  // pina 持久化
  piniaPersistedstate: {
    cookieOptions: {
      sameSite: "strict",
    },
    storage: "localStorage",
  },
  plugins: [
    // '~/plugins/global-alert.ts'
  ],
});
